/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * userPanel.java
 *
 * Created on 22/Out/2012, 16:03:25
 */
package chatclient;

/**
 *
 * @author Old
 */
public class userPanel extends javax.swing.JPanel {
    
    private String nome;
    private int userId;
    

    /** Creates new form userPanel */
    public userPanel() {
        initComponents();
    }
    
    public userPanel(String nome, int id, boolean me) {
        initComponents();
        this.nome = nome;
        this.userId = id;
        if(me){
            butPM.setVisible(false);
        }
        username.setText(nome);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        username = new javax.swing.JLabel();
        butPM = new javax.swing.JButton();

        setMaximumSize(new java.awt.Dimension(125, 32767));
        setMinimumSize(new java.awt.Dimension(125, 30));
        setName("Form"); // NOI18N
        setPreferredSize(new java.awt.Dimension(125, 30));

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(chatclient.ChatSDClientApp.class).getContext().getResourceMap(userPanel.class);
        username.setText(resourceMap.getString("username.text")); // NOI18N
        username.setName("username"); // NOI18N

        butPM.setText(resourceMap.getString("butPM.text")); // NOI18N
        butPM.setName("butPM"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(username)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(butPM, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(40, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(username)
                    .addComponent(butPM))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton butPM;
    private javax.swing.JLabel username;
    // End of variables declaration//GEN-END:variables
}
